home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / r2l.lha / r2l / m2c / Scanner.h < prev    next >
C/C++ Source or Header  |  1992-08-18  |  1KB  |  60 lines

  1. #define DEFINITION_Scanner
  2.  
  3. #ifndef DEFINITION_Strings
  4. #include "Strings.h"
  5. #endif
  6.  
  7. #ifndef DEFINITION_Idents
  8. #include "Idents.h"
  9. #endif
  10.  
  11. #ifndef DEFINITION_StringMem
  12. #include "StringMem.h"
  13. #endif
  14.  
  15. #ifndef DEFINITION_Texts
  16. #include "Texts.h"
  17. #endif
  18.  
  19. #ifndef DEFINITION_Positions
  20. #include "Positions.h"
  21. #endif
  22.  
  23. typedef struct Scanner_1 {
  24.     Positions_tPosition Position;
  25.     union {
  26.         struct {
  27.             Idents_tIdent Ident;
  28.         } V_1;
  29.         struct {
  30.             SHORTCARD Number;
  31.         } V_2;
  32.         struct {
  33.             StringMem_tStringRef String;
  34.         } V_3;
  35.         struct {
  36.             CHAR Ch;
  37.         } V_4;
  38.         struct {
  39.             Texts_tText Text;
  40.         } V_5;
  41.     } U_1;
  42. } Scanner_tScanAttribute;
  43. extern void Scanner_ErrorAttribute ARGS((CARDINAL Token, Scanner_tScanAttribute *Attribute));
  44. #define Scanner_EofToken    0
  45. extern CARDINAL Scanner_TokenLength;
  46. extern Scanner_tScanAttribute Scanner_Attribute;
  47. extern struct Scanner_2 {
  48.     CHAR A[127 + 1];
  49. } Scanner_ScanTabName;
  50. extern PROC Scanner_Exit;
  51. extern void Scanner_BeginScanner ARGS(());
  52. extern void Scanner_BeginFile ARGS((CHAR FileName[], LONGCARD ));
  53. extern INTEGER Scanner_GetToken ARGS(());
  54. extern void Scanner_GetWord ARGS((Strings_tString *Word));
  55. extern void Scanner_GetLower ARGS((Strings_tString *Word));
  56. extern void Scanner_GetUpper ARGS((Strings_tString *Word));
  57. extern void Scanner_CloseFile ARGS(());
  58. extern void Scanner_CloseScanner ARGS(());
  59. extern void BEGIN_Scanner();
  60.